package com.lysj.admin.master.bussiness.admin.controller;

import com.lysj.admin.master.bussiness.admin.domain.Contract;
import com.lysj.admin.master.bussiness.admin.dto.ContractBaseDto;
import com.lysj.admin.master.bussiness.admin.mapper.ContractMapper;
import com.lysj.admin.master.bussiness.admin.service.ContractService;
import com.lysj.admin.master.common.annotation.LogicalDel;
import com.lysj.admin.master.common.annotation.MyList;
import com.lysj.admin.master.common.annotation.Save;
import com.lysj.admin.master.common.annotation.Update;
import com.lysj.admin.master.common.spring.mpbase.MyController;
import com.lysj.admin.master.common.spring.mpbase.MyService;
import com.lysj.admin.master.common.spring.pagination.PageRequestDTO;
import com.lysj.admin.master.common.web.Resp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Created by drj on 2020-01-14 9:56
 * @description
 */
@Slf4j
@RestController
@RequestMapping("/company/contract")
public class ContractController extends MyController<ContractMapper, Contract, ContractBaseDto> {

    @Resource
    private ContractService contractService;

    @Override
    public MyService<ContractMapper, Contract> getService() {
        return contractService;
    }


    @Override
    @MyList
    public Resp list(ContractBaseDto condition) {
        return super.list(condition);
    }



    @Override
    @Save
    public Resp save(Contract entity) {
        return super.save(entity);
    }


    @Override
    @Update
    public Resp update(Contract entity) {
        return super.update(entity);
    }


    @Override
    @LogicalDel
    public Resp logicDelete(String[] ids) {
        return super.logicDelete(ids);
    }
}
